<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<style>
.pf-row {
	margin-bottom: 5px;
}

.pf-row  label {
	display: inline-block;
	width: 30%;
	text-align: right;
}
</style>
<div class="modal fade" data-backdrop="static" id="pf-add-block-item-modal">
	<div class="modal-dialog ">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"></button>
				<h3 id="pf-modal-title">添加</h3>
			</div>
			<div class="modal-body">
				<form id="pf-block-item-save-form" action="/manage/block/item/save" method="post" enctype="multipart/form-data">
					<input type="hidden" class="form-control" placeholder="id" name="id" value="${blockItemEntity.id}" id="id" />
					<input type="hidden" class="form-control" placeholder="推荐位id" name="blockId" value="${blockItemEntity.id}" id="blockId" />
					<%--
	  					<div class="pf-row">
	                        <label> <span class="red">*</span> 推荐位：
	                        </label> 
	                        <!-- <select id="pf-select-block"
	                            class="form-control" style="display: inline-block; width: 150px"></select> -->
	                       <select id="pf-select-block-modal" class="form-control" style="display: inline-block; width: 50%" name="blockId">
	                        </select> 
	                        
	                    </div>
                     --%>
					<div class="pf-row">
						<label> 城市： </label>
						<select id="pf-select-province" class="form-control" style="display: inline-block; width: 25%" name="provinceId">
						</select>
						<span class="clear"> </span>
						<select id="pf-select-city" class="form-control" style="display: inline-block; width: 25%" name="cityId">
						</select>
					</div>
					<div class="pf-row">
						<label> 标题： </label>
						<input type="text" class="form-control" style="display: inline-block; width: 50%" placeholder="标题" name="title" value="" />
					</div>
					<div class="pf-row">
						<label> 链接：</label>
						<input type="text" class="form-control" style="display: inline-block; width: 25%" placeholder="链接" name="link" value="" />
					</div>
					<div class="pf-row">
						<label> 图片： </label>
						<img id="blockItemPicImg" alt="" src="" width="100" height="100">
						<button type="button" class="btn btn-primary" onclick="$('#blockItemPicInput').trigger('click')">选择文件</button>
						<input id="blockItemPicInput" type="file" class="form-control" style="display: none; width: 50%" name="file" value="">
					</div>
					<div class="pf-row">
						<label> 原itemId：</label>
						<input type="text" class="form-control" style="display: inline-block; width: 25%" placeholder="原记录id" name="itemId" value="" />
					</div>
					<div class="pf-row">
						<label>有效期： </label>
						<input type="text" class="form-control" style="display: inline-block; width: 25%;" placeholder="有效期" id="pf-block-item-valid-date" name="expireTimeString" />
						空表示"永不过期"
					</div>
					<div class="pf-row">
						<label>
							<span class="red">*</span>
							排序：
						</label>
						<input type="text" class="form-control" style="display: inline-block; width: 25%" placeholder="排序" name="orderBy" value="" />
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" data-dismiss="modal" class="btn">关闭</button>
				<button type="button" class="btn btn-primary pf-submit" id="pf-submit-block-item">提交</button>
			</div>
		</div>
	</div>
</div>
